<template>
  <div id="rootgoods-top">
    <div class="icon">
      <div class="icon-left" @click="back()"></div>
      <div class="icon-right" @click="xiang()">
        <ul class="list" v-show="showinfo">
          <li class="listson listson-border" @click="shouye()">
            <van-icon class="van-icon" name="wap-home-o" />
            <span>首页</span>
          </li>
          <li class="listson listson-border" @click="fenlei()">
            <van-icon class="van-icon" name="apps-o" />
            <span>分类</span>
          </li>
          <li class="listson listson-border" @click="gouwu()">
            <van-icon class="van-icon" name="shopping-cart-o" />
            <span>购物车</span>
          </li>
          <li class="listson" @click="wode()">
            <van-icon class="van-icon" name="user-o" />
            <span>我的</span>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      showinfo: "",
    };
  },
  methods: {
    xiang() {
      this.showinfo = !this.showinfo;
    },
    back() {
      this.$router.push("/flatboard");
    },
    shouye(){
        this.$router.push("/myhome");
    },
    fenlei(){
         this.$router.push("/second");
    },
    gouwu(){
      this.$router.push("/cart");
    },
    wode(){
        this.$router.push('/wode')
    }
  },
};
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}
.rootgoods-top {
  width: 23.4375rem;
  height: 23.4375rem;
  position: relative;
}
.icon {
  display: flex;
  height: 2.275rem;
}
.icon-left {
  background: url(https://hshop.honorfile.com/nwap/221030101/images/echannelWap/icon/icon_back_grey.png);
  background-size: 1.625rem 1.625rem;
  width: 1.625rem;
  height: 1.625rem;
  margin: 0.475rem 1.25rem;
}
.icon-right {
  background: url(https://hshop.honorfile.com/nwap/221030101/images/echannelWap/icon/icon_more_grey.png);
  background-size: 1.625rem 1.625rem;
  width: 1.625rem;
  height: 1.625rem;
  margin: 0.475rem 0 0 16.25rem;
}



ul {
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.01);
  width: 108px;
  height: 10.625rem;
  position: absolute;
  top: 2.9rem;
  left: 14.25rem;
  background-color: rgba(255, 255, 255, 0.864);
  z-index: 1000;
}
.listson {
  width: 6.75rem;
  height: 2.625rem;
  text-align: left;
  line-height: 2.625rem;
}
.listson-border {
  border-bottom: 1px solid rgb(255, 255, 255);
}
.listson .van-icon {
  margin-left: 0.825rem;
}
li span {
  margin-left: 0.625rem;
}
</style>